package com.woniu.message.feign;

import com.ruoyi.common.core.domain.AjaxResult;
import com.woniu.user.domain.CustomerCoupon;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("user")
public interface UserFeign {
    @PostMapping("/user/tbcustomercoupon/web/insertUserCustomer")
    public Long add(@RequestBody CustomerCoupon customerCoupon);

    @GetMapping("/user/tbcustomercoupon/web/selectOneByUserIdAndCustomerId")
    public CustomerCoupon selectOneByUserIdAndCustomerId(@RequestParam("userId") Long userId,
                                                         @RequestParam("couponId")Long couponId);

    @PutMapping("/user/tbcustomercoupon/web/updateCouponStatus")
    public AjaxResult edit(@RequestParam("id")Long id);

    @GetMapping("/user/tbcustomercoupon/web/selectOneById")
    public CustomerCoupon selectOneById(@RequestParam("id")Long id);
}
